package com.hc.race.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hc.race.entity.Cu;
import com.hc.race.mapper.CuMapper;
import com.hc.race.service.CuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author zy
 * @Date 2023/11/25 10:08
 * @PackageName:com.hc.race.service.impl
 * @ClassName: CuServiceImpl
 * @Description: TODO
 * @Version 1.0
 */
@Service
public class CuServiceImpl extends ServiceImpl<CuMapper, Cu>  implements CuService {
    @Autowired
    private CuMapper cuMapper;
    @Override
    public Cu getInfo(Long userId) {
        QueryWrapper<Cu> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_id",userId);
        Cu cu = cuMapper.selectOne(queryWrapper);
        return cu;
    }
}
